package com.example.jin.intentreceiver;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class IntentReceiver extends AppCompatActivity {

    private Button btn = null;
    private final String nobody = "Who.care.the.name";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        btn = (Button) findViewById(R.id.button);

        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(nobody);
                intent.putExtra("testIntent", "111111111");
                sendBroadcast(intent);
            }
        });

    }
}
